class Invoice < Document
    has_many :corrective_invoices, :class_name => "Invoice", :foreign_key => :corrected_invoice_id
    belongs_to :corrected_invoice, :class_name => "Invoice", :foreign_key => :corrected_invoice_id
	
	validates_presence_of :selling_date, :due_date, :payment_method
	validates_inclusion_of :payment_method, :in => %w(cash credit\ card transfer)
	validates_inclusion_of :document_type, :in => %w(invoice)
end
